package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ExamStudentRecordMapper;
import com.ruoyi.system.domain.ExamStudentRecord;
import com.ruoyi.system.service.IExamStudentRecordService;

/**
 * 学生答题记录Service业务层处理
 * 
 * @author tyro
 * @date 2025-05-21
 */
@Service
public class ExamStudentRecordServiceImpl implements IExamStudentRecordService 
{
    @Autowired
    private ExamStudentRecordMapper examStudentRecordMapper;

    /**
     * 查询学生答题记录
     * 
     * @param id 学生答题记录主键
     * @return 学生答题记录
     */
    @Override
    public ExamStudentRecord selectExamStudentRecordById(Long id)
    {
        return examStudentRecordMapper.selectExamStudentRecordById(id);
    }

    /**
     * 查询学生答题记录列表
     * 
     * @param examStudentRecord 学生答题记录
     * @return 学生答题记录
     */
    @Override
    public List<ExamStudentRecord> selectExamStudentRecordList(ExamStudentRecord examStudentRecord)
    {
        return examStudentRecordMapper.selectExamStudentRecordList(examStudentRecord);
    }

    /**
     * 新增学生答题记录
     * 
     * @param examStudentRecord 学生答题记录
     * @return 结果
     */
    @Override
    public int insertExamStudentRecord(ExamStudentRecord examStudentRecord)
    {
        return examStudentRecordMapper.insertExamStudentRecord(examStudentRecord);
    }

    /**
     * 修改学生答题记录
     * 
     * @param examStudentRecord 学生答题记录
     * @return 结果
     */
    @Override
    public int updateExamStudentRecord(ExamStudentRecord examStudentRecord)
    {
        return examStudentRecordMapper.updateExamStudentRecord(examStudentRecord);
    }

    /**
     * 批量删除学生答题记录
     * 
     * @param ids 需要删除的学生答题记录主键
     * @return 结果
     */
    @Override
    public int deleteExamStudentRecordByIds(Long[] ids)
    {
        return examStudentRecordMapper.deleteExamStudentRecordByIds(ids);
    }

    /**
     * 删除学生答题记录信息
     * 
     * @param id 学生答题记录主键
     * @return 结果
     */
    @Override
    public int deleteExamStudentRecordById(Long id)
    {
        return examStudentRecordMapper.deleteExamStudentRecordById(id);
    }
}
